package com.chensi.service.impl;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chensi.dao.IBaseDao;
import com.chensi.service.IBaseService;

@Service
public class BaseServiceImpl implements IBaseService{
	@Autowired
	protected IBaseDao dao;

	@Override
	public boolean save(Object obj) {
		return dao.save(obj);
	}

	@Override
	public Serializable saveReturnId(Object obj) {
		return dao.saveReturnId(obj);
	}

	@Override
	public boolean saveOrUpdate(Object obj) {
		return dao.saveOrUpdate(obj);
	}

	@Override
	public boolean saveOrUpdateAll(Collection<?> c) {
		return dao.saveOrUpdateAll(c);
	}

	@Override
	public boolean update(Object obj) {
		return dao.update(obj);
	}

	@Override
	public boolean update(String hql, Object... values) {
		return dao.update(hql, values);
	}

	@Override
	public boolean update(String hql, List<?> values) {
		return dao.update(hql, values);
	}

	@Override
	public boolean delete(Object obj) {
		return dao.delete(obj);
	}

	@Override
	public boolean delete(String hql, Object... values) {
		return dao.delete(hql, values);
	}

	@Override
	public boolean delete(String hql, List<Object> values) {
		return dao.delete(hql, values);
	}

	@Override
	public boolean deleteAll(Collection<?> c) {
		return dao.deleteAll(c);
	}

	@Override
	public <T> T get(Class<T> c, Serializable id) {
		return dao.get(c, id);
	}

	@Override
	public <T> T load(Class<T> c, Serializable id) {
		return dao.load(c, id);
	}

	@Override
	public Object findOne(String hql, Object... values) {
		return dao.findOne(hql, values);
	}

	@Override
	public Object findOne(String hql, List<Object> values) {
		return dao.findOne(hql, values);
	}

	@Override
	public Object findOne(String hql, Map<String, Object> values) {
		return dao.findOne(hql, values);
	}

	@Override
	public Object findUniqueOne(String hql, Object... values) {
		return dao.findUniqueOne(hql, values);
	}

	@Override
	public Object findUniqueOne(String hql, List<Object> values) {
		return dao.findUniqueOne(hql, values);
	}

	@Override
	public Object findUniqueOne(String hql, Map<String, Object> values) {
		return dao.findOne(hql, values);
	}

	@Override
	public List find(String hql) {
		return dao.find(hql);
	}

	@Override
	public List find(String hql, Object... values) {
		return dao.find(hql, values);
	}

	@Override
	public List find(String hql, List<Object> values) {
		return dao.find(hql, values);
	}

	@Override
	public List find(String hql, Map<String, Object> values) {
		return dao.find(hql, values);
	}

	@Override
	public List findPage(String hql, int page, int rows, List<Object> values) {
		return dao.findPage(hql, page, rows, values);
	}

	@Override
	public List findPage(String hql, int page, int rows, Object... values) {
		return dao.findPage(hql, page, rows, values);
	}

	@Override
	public List findPage(String hql, int page, int rows, Map<String, Object> values) {
		return dao.findPage(hql, page, rows, values);
	}
	
	
}
